#include <iostream>

using namespace std;

int main() 
{
    int i = 7;
    int j = 9;
    int tnt = 0;

    /* note: 非0即为真 */
    if (i%3 && j %7) {
        cout << "true, " << i << j << endl;
    } else {
        cout << "false, " << i << j << endl;
    }

    for (i = 0; i < 10; i++){
        if (i % 3  && i % 7){
            tnt = tnt + i;
        }
    }
    cout << tnt << endl;

    /* 强制类型转换 */
    i = int(7.5);
    cout << i << endl;
    i = (int)8.9;
    cout << i << endl;

    /* ++j 和 j++ */
    cout << "test about '++j' and 'j++'" << endl;
    cout << ++j << endl;
    cout << j << endl;
    cout << j++ << endl;
    cout << j << endl;

    // c++中的库函数 isalpah() 函数用来判断输入的参数是否为字母
    if (isalpha('!')) {
        cout << "isalpah('!') : true" << endl;
    } else {
        cout << "isalpah('!') : false" << endl;
    }
    if (isalpha('G')) {
        cout << "isalpah('G') : true" << endl;
    } else {
        cout << "isalpah('G') : false" << endl;
    }
    if (isalpha('4')) {
        cout << "isalpah('4') : true" << endl;
    } else {
        cout << "isalpah('4') : false" << endl;
    }
    if (isalpha(' ')) {
        cout << "isalpah(' ') : true" << endl;
    } else {
        cout << "isalpah(' ') : false" << endl;
    }
    return 0;
}